/*
 * Copyright 2001-2023 Haiku, Inc.
 * Distributed under the terms of the MIT License.
 *
 * Authors: Amor
 */
#ifndef ANT_DECORATOR_H
#define ANT_DECORATOR_H


#include "TabDecorator.h"
#include "DecorManager.h"


class Desktop;
class ServerBitmap;

class AntDecorAddOn : public DecorAddOn {
public:
								AntDecorAddOn(image_id id, const char* name);

protected:
	virtual Decorator*			_AllocateDecorator(DesktopSettings& settings,
								BRect rect, Desktop* desktop);
};

class AntDecorator: public TabDecorator {
public:
								AntDecorator(DesktopSettings& settings,
								BRect frame, Desktop* desktop);
	virtual					~AntDecorator();

	virtual	void			GetComponentColors(Component component,
								uint8 highlight, ComponentColors _colors,
								Decorator::Tab* tab = NULL);

	virtual void			UpdateColors(DesktopSettings& settings);

protected:
	virtual	void			_DrawFrame(BRect rect);

	virtual	void			_DrawTab(Decorator::Tab* tab, BRect r);
	virtual	void			_DrawTitle(Decorator::Tab* tab, BRect r);
	virtual	void			_DrawClose(Decorator::Tab* tab, bool direct,
								BRect rect);
	virtual	void			_DrawZoom(Decorator::Tab* tab, bool direct,
								BRect rect);
	virtual	void			_DrawMinimize(Decorator::Tab* tab, bool direct,
								BRect rect);

private:
 			void			_DrawButtonBitmap(ServerBitmap* bitmap,
 								bool direct, BRect rect);
			void			_DrawBlendedRect(DrawingEngine *engine,
								const BRect rect, bool down,
								const ComponentColors& colors);
			ServerBitmap*		_GetBitmapForButton(Decorator::Tab* tab,
								Component item, bool down, int32 width,
								int32 height);

			void			_GetComponentColors(Component component,
								ComponentColors _colors,
								Decorator::Tab* tab = NULL);

			// Ant Design specific colors
			rgb_color			fAntPrimaryColor;
			rgb_color			fAntSuccessColor;
			rgb_color			fAntWarningColor;
			rgb_color			fAntErrorColor;
			rgb_color			fAntInfoColor;
};


#endif	// ANT_DECORATOR_H